<template>
    <div class="container">

        <div>
            <head-bar height="80" middleText="发布动态" :leftClick="returnPage"></head-bar>
        </div>

        <div class="content" style="margin-top: 100px;">
            <div style="border-width: 1px;border-color: #00B4FF;" @click="openCamera">测试页面</div>
        </div>
    </div>
</template>

<style>
    .container {
        flex-direction: column-reverse;

    }

    .content {
        padding-left: 15px;
        padding-right: 15px;
    }



</style>

<script>
    import headBar from '../components/headBar.vue'

    export default {
        components: {headBar},
        data: () => ({

        }),
        methods: {
            //打开相机
            openCamera() {
                var self=this
                const photo = weex.requireModule('photo');
                photo.openCamera(500,800,'#000000',function(e){

                    console.info(self.src=e.path)
                })
            },
            //打开相册
            openPhoto() {
                var self=this;
                const photo = weex.requireModule('photo')
                photo.open(500,800,'#000000','#ffffff','#ffffff',function(e){
                    console.info(self.src=e.path)
                })
            },
        },
        mounted() {

        }
    };
</script>